﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DotNetNuke.Entities.Users;
using System.Xml.Linq;
using DotNetNuke.Security.Membership;
using System.Collections.Specialized;
using System.Web.UI;

namespace BrandonHaynes.Membership.Factors
	{
	/// <summary>
	/// An interface representing a factor used in authentication
	/// </summary>
	public interface IAuthenticationFactor
		{
		/// <summary>
		/// The name of this factor
		/// </summary>
		string Name { get; }

		/// <summary>
		/// Authenticates a principal against this factor using the given credential
		/// </summary>
		/// <param name="user">The principal to authenticate</param>
		/// <param name="credential">The credential used to authenticate</param>
		void Authenticate(UserInfo user, Credential credential);

		/// <summary>
		/// For factors that report as incomplete, an ASP.NET control used to collect that additional information
		/// </summary>
		Control PromptControl { get; }
		}
	}
